<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:form id="frmCreateHospital">
        <f:view>
            <p:dialog id="dlgCreateHospital"
                      widgetVar="wgCreateHospital"
                      header="Create Hospital"
                      draggable="true"
                      showEffect="fade"
                      hideEffect="clip"
                      >

                <h:panelGrid id="pnCreateHospital" columns="2">
                    <p:outputLabel value="HospitalName:" for="hospitalName" />
                    <p:inputText id="hospitalName" value="#{hospitalManagement.hospital.hospitalName}" title="HospitalName" maxlength="30"/>
                    <p:outputLabel value="Address:" for="address" />
                    <p:inputText id="address" value="#{hospitalManagement.hospital.address}" title="Address" maxlength="300" />
                    <p:outputLabel value="City:" for="city" />
                    <p:inputText id="city" value="#{hospitalManagement.hospital.city}" title="City" maxlength="30" />
                    <p:outputLabel value="Region:" for="region" />
                    <p:inputText id="region" value="#{hospitalManagement.hospital.region}" title="Region" maxlength="30" />
                    <p:outputLabel value="PostalCode:" for="postalCode" />
                    <p:inputText id="postalCode" value="#{hospitalManagement.hospital.postalCode}" title="PostalCode" maxlength="5" />
                    <p:outputLabel value="OfficePhone:" for="officePhone" />
                    <p:inputText id="officePhone" value="#{hospitalManagement.hospital.officePhone}" title="OfficePhone" maxlength="14" />


                    <p:outputLabel value="IsLock:" for="isLock" />
                    <p:selectOneMenu id="isLock" value="#{hospitalManagement.hospital.isLock}" >
                        <f:selectItem itemLabel="False" itemValue="False" />
                        <f:selectItem itemLabel="True" itemValue="True"  />

                    </p:selectOneMenu>

                </h:panelGrid>
                <f:facet name="footer">
                    <p:commandButton  id="btnCreateHospital"
                                      value="Create"
                                      icon="ui-icon-check"
                                      style="margin:0"
                                      actionListener="#{hospitalManagement.create}"
                                      update=":frmViewHospital:dtViewHospital,
                                      :growl,
                                      :frmCreateCalim:hospital,
                                      :frmCreateHospital:pnCreateHospital,
                                      :frmCreatePayment:hospital"
                                      oncomplete="HospitalManagementRequest(xhr, status, args)"
                                      />
                    <p:commandButton id="btnCancelCreateHostpital"
                                     value="Cancel"
                                     icon="ui-icon-check"
                                     style="margin:0"
                                     onclick="wgCreateHospital.hide();"
                                     />
                </f:facet>
            </p:dialog>
        </f:view>
    </h:form>
</html>
